<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>Form</title>
</head>
<body>
<div>

   <form action="{:U('User/selectGroup')}" method="post" accept-charset="utf-8" enctype="multipart/form-data" >
<table border="1">
    <thead>
        <tr>
            <th>id</th> 
            <th>title</th> 
            <th>status</th> 
            <th>rules</th> 
            <th>操作</th> 
        </tr>
    </thead>
    <tbody>
        <foreach name='rows' item='row'>
        <tr>
            <td>{$row.id}</td>
            <td>{$row.title}</td>
            <td>{$row.status}</td>
            <td>{$row.rules}</td>
            <td><input type="checkbox" name="newgids[]" value="{$row.id}" <in name="row.id" value="$ugids">checked</in> /> </td>
            <!--
            <td><a href="{:U('Admin/Usergroup/edit',array('id'=>$list['id']))}" >编辑</a></td>
            -->
        </tr>
        </foreach>
    </tbody>
</table>
    <!-- 在视图中把旧id传递过去，很笨的同控制器不同方法之间传参的方法 -->
    <foreach name='ugids' item='id'>
    <input type="hidden" name="oldgids[]" value="{$id}" />
    </foreach>
    <input type="hidden" name="uid" value="{$uid}"/>
<p><input type="submit" value="提交">
</form>
</div>

</body>
</html>
